import {requestClient} from '#/api/request';

export async function findRoleList(params) {
    return requestClient.get('/sys/role/list', {params});
}

export async function findRoleListPage(params) {
    return requestClient.get('/sys/role/list/page', {params});
}

export async function findRoleUserListPage(params) {
    return requestClient.get('/sys/role/user/list/page', {params});
}

export async function findRoleMenuIds(params) {
    return requestClient.get('/sys/role/menu-ids', {params});
}

export async function createRoleInfo(data) {
    return requestClient.post('/sys/role/create', data)
}

export async function updateRoleInfo(data) {
    return requestClient.put('/sys/role/update', data)
}

export async function roleAuthority(data) {
    return requestClient.post('/sys/role/authority', data)
}

export async function removeRoleInfo(id) {
    return requestClient.delete('/sys/role/remove', {params: {id}})
}

export async function removeRoleUser(params) {
    return requestClient.delete('/sys/role/remove/user', {params})
}